from pywinauto.application import Application
import pywinauto


EXE = r'D:\software\同花顺\hexin.exe'

app = pywinauto.Application().connect(path=EXE, timeout=10)

dlg = app.window(title="短线精灵")

print(dir(dlg))

exit(0)

XIADAN_CLIENT_PATH = r'D:\software\同花顺\xiadan.exe'

# 启动或连接到应用
app = pywinauto.Application().connect(path=XIADAN_CLIENT_PATH, timeout=10)

# 使用标题获取窗口
dlg = app.window(title="网上股票交易系统5.0")
# 使用child_window获得控件
control = dlg.child_window(class_name="Edit", found_index=0)
# print(control)
# 获取控件的control_id
control_id = control.control_id()
print(control_id)


